-- GENERATED SPELL FOR [Jailor Borhuin] --


function spell0_2431(pUnit, Event) --@Disarm,n/a--
pUnit:FullCastSpellOnTarget(8379,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2431', 10348, 1)
end

function spell1_2431(pUnit, Event) --@Net,n/a--
pUnit:FullCastSpellOnTarget(6533,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2431', 2255, 1)
end

function spell2_2431(pUnit, Event) --@Pummel,n/a--
pUnit:FullCastSpellOnTarget(12555,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2431', 5253, 1)
end

function Sorts_2431(pUnit, Event)
local choix_sorts_2431 = math.random(0, 2)
if choix_sorts_2431 == 0 then
pUnit:RegisterEvent('spell0_2431', 1, 1)
end
if choix_sorts_2431 == 1 then
pUnit:RegisterEvent('spell1_2431', 1, 1)
end
if choix_sorts_2431 == 2 then
pUnit:RegisterEvent('spell2_2431', 1, 1)
end
end

function mob2431_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2431', math.random(1500, 3000), 1)
end

function mob2431_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2431_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2431_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2431, 1, 'mob2431_Action')
RegisterUnitEvent(2431, 2, 'mob2431_Leave')
RegisterUnitEvent(2431, 3, 'mob2431_Kill')
RegisterUnitEvent(2431, 4, 'mob2431_Die')
